<?php
class BlogRelationModel extends RelationModel{
  protected $tableName ='blog';
  
  protected $_link = array(
       'attr'=>array(
         'mapping_type'=>MANY_TO_MANY,
        // 'class_name'=>'attr',
         'mapping_name'=>'attr',  
         'foreign_key'=>'bid',
         "relation_foreign_key"=>'aid',
         'relation_table'=>'blog_attr'
       	  ),
       'cate'=>array(
        'mapping_type'=>BELONGS_TO, 
        'foreign_key'=>'cid',
        //'as_fields'=>'name:cate',
         'class_name'=>'cate',
          'mapping_name'=>'cate'
       	   )
  	);

}



?>